/*
 * Copyright 2006 Web Cohesion
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package co.edu.unal.bioingenium.kbmed.ontology.services.api;

import co.edu.unal.bioingenium.kbmed.ontology.domain.Ontology;

import javax.jws.WebService;
import java.util.Collection;

/**
 * The linkage service is used to service the data for creating links between personas.  This
 * includes links and social groups.
 * 
 * @author Ryan Heaton
 */
@WebService
public interface OntologyService {

    /**
     * Read the specified social group.
     *
     * @param groupId The id of the group.
     * @return The social group.
     */
    Ontology readGroup(String groupId);

    /**
     * Create a social group.
     *
     * @param groupLeader The id of the group leader.
     * @param memberIds The ids of the members of the group.
     * @param exclusive Whether the group is exclusive.
     * @return The group that was created.
     */
    Ontology createSocialGroup(String groupLeader,
            Collection<String> memberIds,
            boolean exclusive);

    /**
     * Adds a persona to a social group.
     *
     * @param groupId The id of the group to add the persona to.
     * @param personaId The id of the persona to add to the group.
     * @return Whether the persona was successfully added.
     * @throws ExclusiveGroupException If the group is exclusive.
     */
    boolean addToSocialGroup(String groupId,
            String personaId) ;
}
